Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create multiarch image by cross-compiling Swift package to arm64 #125

Merged
merged 67 commits into from
Aug 2, 2023

Conversation

fwcd
Copy link
Owner

@fwcd fwcd commented Dec 29, 2022

Fixes #124

  • Enable linux/arm64/v8 platform in Ci workflow again
  • Make the build scripts aware of their target architecture
  • Bootstrap an arm64 sysroot
  • Provide the correct Swift flags for cross-compilation

Implementation notes:

Future directions:

  • Investigate which packages/flags/workarounds could be dropped without breaking the cross-build (e.g. build-essential in install-build-dependencies-apt)
  • Strip down the sysroot copied into the builder, see Dockerfile

@fwcd fwcd added enhancement New feature or request ci-cd CI/CD-related (GitHub Actions, GitLab CI, ...) docker Docker-related labels Dec 29, 2022
@fwcd fwcd force-pushed the docker/cross-compile-image branch from d333b70 to e588b87 Compare July 30, 2023 15:49
fwcd and others added 26 commits July 30, 2023 17:57
...in order to not interfere with cross-GCC packages.
This seems to work better with the Swift cross-linker (lld), since we
now have a -tools-directory we can point it at.
...to make sure D2 finds the Swift standard libraries at runtime.
The layers are probably too large for this
@fwcd fwcd marked this pull request as ready for review August 2, 2023 00:12
@fwcd fwcd merged commit 8efd8ac into main Aug 2, 2023
3 checks passed
@fwcd fwcd deleted the docker/cross-compile-image branch August 2, 2023 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-cd CI/CD-related (GitHub Actions, GitLab CI, ...) docker Docker-related enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build aarch64 Docker images in CI
1 participant